<template>
    <el-container  v-loading="loading">
        <el-header :style="{background:color,'fontSize':'16px'}"> 
             <div style='padding:5px;cursor:pointer;line-height:50px;margin-right:10px'  @click="collapseAside">
                     <el-tooltip class="item" effect="dark" content="点击切换左边菜单栏收缩和展开状态" placement="top-start" style="cursor:pointer">
                        <i class='fa fa-bars'></i>
                     </el-tooltip>
                 </div>
            <span @click="returns" style='cursor:pointer;line-height:60px' :class="{'noMenu':noTitleMenu=='Y'}"><img :src='logoImg' style='width:32px;float:left;vertical-align:middle;margin-top:15px;margin-right:10px;line-height:60px;font-size:15px'/>{{title1}}</span>
             <div style='text-align:center;height:60px;margin-left:25px' class='model_item_home' >
                    <div style='position:relative;padding-top:20px' >
                        <el-tooltip class="item" effect="dark" content="点击返回首页" placement="top-start">
                        <i class='icon iconfont icon-index-copy' style='font-size:20px' v-if="isMain=='Y'" @click="returns">
                        </i>
                       </el-tooltip>
                        <div class="kailong"></div>
                    </div>
                </div>
            
            <div class='model'  >
                
               <div v-if="noTitleMenu!='Y'&&desktopMain.length<5" >
                    <div style='text-align:center;height:60px' :class='modelAllClassName'  @click="changeMenu(-1)">
                        <div style='position:relative;padding-top:10px' >
                            <span class="icon iconfont iconfont2"  >&#xe65a;</span><div class='model_span'>全部</div>
                            <div class="kailong"></div>
                        </div>
                    </div>
                    <div style='text-align:center;height:60px' :class='item.className' v-for="(item,index) in desktopMain" :key="index" @click="changeMenu(index)">
                        <div style='position:relative;padding-top:10px' >
                            <span class="icon iconfont iconfont2" v-html="item.iconfont" v-if="item.iconfont"></span>
                            <i :class="item.fa" v-else-if="item.fa"></i>
                            <div class='model_span'>{{item.text}}</div>
                            <div class="kailong"></div>
                        </div>
                    </div>
               </div>
               
            </div>
            <div class='user' style='padding-top:20px'>
                <!--div id="DateTime" style='display:inline;margin-right:15px;'></div-->
                 <!--el-divider direction="vertical"></el-divider>
                <span style='margin-right:15px;margin-left:15px'>{{title2}}</span-->
                 <!--el-divider direction="vertical" ></el-divider-->
                
                 
                 <el-popover
                    placement="bottom"
                    width="880"
                    style="padding:0"
                    v-if="mainModel.length>1"
                    trigger="hover">
                        <div style="width:100%;height:100%;padding:5px;" class="mainModelContent">
                            <div class='mainTitle'><img :src='logo' v-if="logo!=''" style='vertical-align: middle;width:25px;margin-right:10px;'/>{{mainTitle}}</div>
                            <grid-layout
                                :layout.sync="mainModel"
                                width="100%"
                                :col-num="12"
                                :row-height="12"
                                :is-draggable="false"
                                :is-resizable="false"
                                :is-mirrored="false"
                                :vertical-compact="true"
                                :margin="[10, 10]"
                                :use-css-transforms="true"
                        >

                            <grid-item v-for="item in mainModel"
                                
                                    :x="item.x"
                                    :y="item.y"
                                    :w="item.w"
                                    :h="item.h"
                                    :i="item.key"
                                    :key="item.key">
                                    <div class="griditem animate__animated "  :style="{'backgroundColor':item.color}" @click="changeFilename(item)" >
                                        <i :class="item.fa"></i>
                                        <div class="griditem_text" :style="item.textStyle">
                                            {{item.text}}
                                        </div>
                                        
                                    </div>
                            </grid-item>
                        
                        </grid-layout>
                    </div>
                    <span slot="reference" style="margin-right:20px;cursor:pointer">更多</span>
                </el-popover>
                 
                 <el-dropdown style='margin-right:10px'>
                     <span>
                          <el-badge  :value="notice_total"  class="item" style='color:#fff;cursor:pointer' v-if="notice_total>0">
                                <i class='fa fa-bell-o'></i>
                            </el-badge>
                            
                     </span>
                    
                    <el-dropdown-menu slot="dropdown">

                        <el-dropdown-item v-for="(item,index) in notice" :key="index"  @click.native="openNotice(item)">
                            <div class='notice_item'>
                                <div class='notice_item_content'>
                                    {{item.title}}
                                </div>
                                <div class='notice_item_num' >
                                    <span class='notice_item_num_bage' v-if="item.num!=0">
                                        {{item.num}}
                                    </span>
                                </div>
                            </div>
                            
                        </el-dropdown-item>
                       
                    </el-dropdown-menu>
                </el-dropdown>
                
                <i class='fa fa-user-circle' style='margin-left:15px'></i>
                &nbsp;
                <el-dropdown>
                    <span class="el-dropdown-link" style='color:#fff;font-size:14px;cursor:pointer;'>
                        {{username}}<i class='el-icon-arrow-down' style='margin-left:5px;'></i>
                    </span>
                    
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item icon="el-icon-lock" @click.native="updatePwd()">修改密码</el-dropdown-item>
                        <el-dropdown-item icon="el-icon-user" @click.native="logout()">退出登陆</el-dropdown-item>
                        <el-dropdown-item icon="el-icon-setting" @click.native="sets()">设置</el-dropdown-item>
                        <el-dropdown-item icon="el-icon-setting" @click.native="setDevOps('Y')" v-if="isDevOpsSet=='Y'&&(isDevOps!='Y')">开启界面设计</el-dropdown-item>
                        <el-dropdown-item icon="el-icon-setting" @click.native="setDevOps('N')" v-if="isDevOpsSet=='Y'&&(isDevOps=='Y')">关闭界面设计</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </div>
        </el-header>
        <el-container >
            <el-aside width="200px" v-if="isFolder=='N'" >
                <div  v-for="(item,index) in desktop" :key="index" v-on:click="openUrl(item,index)" :class="{'content_item':true,itemActive:index==isactive}" >
                    <!--img :src='item.icon'>
                    <div>{{item.text}}</div-->
                    <div>
                        <i class="fa fa-briefcase" aria-hidden="true" style='margin-right:10px;vertical-align: middle' v-if="item.fa!=''"></i>
                        <img :src="item.icon"  style='margin-right:10px;vertical-align: middle;width:24px;height:24px;margin-left:10px;' v-else/>
                        <span style='line-height:30px;'>{{item.text}}</span></div>
                </div>
            </el-aside>
             <el-aside :width="asideWidth" v-if="isFolder=='Y'" style='overflow-x:hidden;'>
                
                 <el-menu
                    :collapse="isCollapse"
                    default-active="0"
                    class="el-menu-vertical-demo"
                    :default-openeds="defaultOpends"
                    text-color="#fff"
                    :background-color="color2"
                    active-text-color="#fff"
                    style="width:100%;height:100%"
                    >
                    <template v-for="(item) in desktop" >
                        <el-submenu :index="item.key" v-if="item.children.length>0" :key="item.key" >
                       
                            <template slot="title">
                                <i class="icon iconfont iconfont2" v-html="item.iconfont" v-if="item.iconfont" style='margin-right:5px;'></i>
                                <i :class='item.fa' v-else-if="item.fa" style='margin-right:5px;'></i>
                                <i class='fa fa-building' style='margin-right:5px;' v-else></i>
                                <span>{{item.text}}</span>
                            </template>
                            <template v-for="(child) in item.children">
                                <el-menu-item v-if="child.children.length==0" v-on:click="openUrl(child)" :key="child.key" :index="child.key">
                                    <i class="icon iconfont iconfont2" v-html="child.iconfont" v-if="child.iconfont" style='margin-right:5px;'></i>
                                    <i :class='child.fa' v-else-if="child.fa" style='margin-right:5px;'></i>
                                    <!--img :src="child.icon"  style='margin-right:10px;vertical-align: middle;width:24px;height:24px;margin-left:10px;' v-else-if="child.icon"/-->
                                    <i class='fa fa-building' style='margin-right:5px;' v-else ></i>
                                    <span >{{child.text}}</span>
                                </el-menu-item>
                                <el-submenu v-else :key="child.key" :index="child.key">
                                     <template slot="title">
                                        <i class="icon iconfont iconfont2" v-html="child.iconfont" v-if="child.iconfont" style='margin-right:5px;'></i>
                                        <i :class='child.fa' v-else-if="child.fa" style='margin-right:5px;'></i>
                                        <!--img :src="child.icon"  style='margin-right:10px;vertical-align: middle;width:24px;height:24px;margin-left:10px;'  v-else-if="child.icon"/-->
                                        <i class='fa fa-building' style='margin-right:5px;' v-else></i>
                                        <span>{{child.text}}</span>
                                    </template>
                                    <template v-for="(child2) in child.children"   >
                                        
                                        <el-menu-item  v-on:click="openUrl(child2)" :key="child2.key" :index="child2.key">
                                            <i class="icon iconfont iconfont2" v-html="child2.iconfont" v-if="child2.iconfont" style='margin-right:5px;'></i>
                                            <i :class='child2.fa' v-else-if="child2.fa" style='margin-right:5px;'></i>
                                            <!--img :src="child.icon"  style='margin-right:10px;vertical-align: middle;width:24px;height:24px;margin-left:10px;'  v-else-if="child.icon"/-->
                                            <i class='fa fa-building' style='margin-right:5px;' v-else></i>
                                            <span >{{child2.text}}</span>
                                        </el-menu-item>
                                    </template>
                                </el-submenu>
                            </template>
                            <!--el-menu-item :index="`${index}-${index2}`"  v-for="(child,index2) in item.children" :key="index2" v-on:click="openUrl(child)" >
                                    <span >{{child.text}}</span>
                                </el-menu-item-->
                           
                        </el-submenu>
                         <el-menu-item :index="item.key"  v-if="item.children.length==0"  v-on:click="openUrl(item)" :key="item.key">
                            <span class="icon iconfont iconfont2" v-html="item.iconfont" v-if="item.iconfont" style='margin-right:5px;'></span>
                            <i :class='item.fa' v-else-if="item.fa"></i>
                             <i class='fa fa-building' style='margin-right:5px;' v-else></i>
                            <span>{{item.text}}</span>
                        </el-menu-item>
                    </template>
                    
                   
                    
                </el-menu>
                 <!--el-collapse  v-model="activeName" accordion>
                    <el-collapse-item v-for="(item,index) in desktop" :key="index" :name="index" >
                        <template slot="title">
                        <i :class='item.fa' style='margin-right:5px'></i>{{item.text}}
                        </template>
                       
                        <div class='content_item' v-for="(child,index2) in item.children" :key="index2" v-on:click="openUrl(child)" >
                            
                            <div><i :class="child.fa" aria-hidden="true" style='margin-right:10px;vertical-align: middle;margin-left:10px'></i>{{child.text}}</div>
                        </div>
                    </el-collapse-item>
                </el-collapse-->
            </el-aside>
            <el-main v-loading="loading2">
                <div class='el-main-content'>
                    <div class='headers' style='display:none'>
                        <el-breadcrumb separator="/">
                        <el-breadcrumb-item v-for="(item,index) in bar" :key="index">
                            <a :href="item.url">{{item.text}}</a>
                        </el-breadcrumb-item>
                    
                        </el-breadcrumb>
                    </div>

                    <div class='eltabs' style='height:41px;'>
                        <el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" @tab-click="tabClick"  :before-leave="beforeLeaveTab"> 
                            <el-tab-pane
                                v-for="(item) in editableTabs"
                                :key="item.name"
                                :label="item.title"
                                :name="item.name"
                            >
                                
                            </el-tab-pane>
                        </el-tabs>
                    </div>
                    <div class="el-tabs__content2" v-loading="routerLoading" v-if="loading3">
                        
                        <keep-alive>
                            <router-view :key="key"  @openWin="openWin2" @closeWin="closeWins" @goSearch="goSearch" ref="routers" v-if='$route.meta.keepAlive'></router-view>
                        </keep-alive>
                        <router-view :key="key"  @openWin="openWin2" @closeWin="closeWins" @goSearch="goSearch" ref="routers" v-if='!$route.meta.keepAlive'></router-view>
      

                    </div>
                </div>
                
                
                

                <el-dialog
                v-el-drag-dialog
                :title="item.text"
                :modal="false"
                class="dialogClass"
                :visible.sync="item.dialogVisible"
                :width="item.width" :height="item.height" v-for="(item,index) in windowModel" :key="index">
                
                    <iframe id="iframe" name="iframe" :src="item.url"  class='dialogIframe'  frameborder="no" border="0" marginwidth="0" marginheight="0" style='width:100%'></iframe>
        
                
            </el-dialog>
            <el-dialog
                v-el-drag-dialog
                title="二级菜单"
                :modal="false"
                class="dialogClass"
                width="30%"
                :visible.sync="dialogVisible2"
                >
                <el-row v-for="(item,index) in buttonJson" :key="index" style='margin-top:15px'>
                     <el-col :span="24">
                        <el-button type="primary"   @click="openWin(item)"  style='width:100%'>{{item.buttonName}}</el-button>
                     </el-col>
                </el-row>
                
            </el-dialog>


            <el-dialog
                v-el-drag-dialog
                :title="commonEditData.title"
                :modal="true"
                :class="{'dialogClass':true, 'dialog-vertical':true, 'animate__animated':false,'animate__zoomIn':false,'animate__zoomOut':false,'dialogClassss':true} "
                :width="commonEditData.width"
                top="0"
                center
                :style='{"left":"0","top":"0","height":commonEditData.exHeight,"marginTop":commonEditData.marginTop}'
                :visible.sync="dialogVisible3"
                @close="commonEditClose"
                @open="opened"
                >
               
                    <common-edit ref="commonEdits" :commonEditData="commonEditData" :style='commonEditData.height' @openWinEdit="openWinEdit" @openWin="openWin2" @closeWin="closeWins" @goSearch="goSearch2" v-if="dialogVisible3"></common-edit>
                
            </el-dialog>
            <el-dialog
                v-el-drag-dialog
                :title="commonEditData.title"
                :modal="true"
                :class="{'dialogClass':true, 'dialog-vertical':true, 'animate__animated':false,'animate__zoomIn':false,'animate__zoomOut':false,'dialogClassss':true} "
                :width="commonEditData.width"
                top="0"
                center
                :style='{"left":"0","top":"0","height":commonEditData.exHeight,"marginTop":commonEditData.marginTop}'
                :visible.sync="dialogVisible3_view"
                @close="commonEditClose"
                @open="opened"
                >
               
                    <common-view ref="commonEdits" :commonEditData="commonEditData" :style='commonEditData.height' @openWinEdit="openWinEdit" @openWin="openWin2" @closeWin="closeWinView" @goSearch="goSearch2" v-if="dialogVisible3_view"></common-view>
                
            </el-dialog>
            <el-dialog
                v-el-drag-dialog
                :title="commonEditData2.title"
                :modal="true"
                class="dialogClass dialog-vertical2"
                :width="commonEditData2.width"
                top="0"
                center
                style='left:0;top:0'
                :visible.sync="dialogVisible4"
                @open="opened2"
                >
                <common-edit ref="commonedit2" :commonEditData="commonEditData2" :style='commonEditData2.height'  @openWin="openWin2" @closeWin="closeWins2" @goSearch="goSearch3" v-if="dialogVisible4"></common-edit>
                <div v-if="commonEditData2.isSave=='N'" style='background:#f6f3f3;text-align:center'>
                      <el-button type="primary" size="small" style='margin-right:10px' @click="saveData">保存</el-button>
                      <el-button type="danger"  size="small" @click="dialogVisible4=false">关闭</el-button>
                </div>
            </el-dialog>

             <el-dialog
                v-el-drag-dialog
                :title="commonListData.title"
                class="dialogClass dialog-vertical3"
                :width="commonListData.width"
                top="0"
                center
                style='left:0;top:0'
                :visible.sync="dialogVisible5"
                @open="opened3"
                >
               <list :commonListData="commonListData" ref="commonListNotice" v-if="dialogVisible5" :style="commonListData.height"  @openWin="openWin2" isSearch="Y"></list>
                
            </el-dialog>
            <el-dialog
                v-el-drag-dialog
                :title="commonData.title"
                class="dialogClass dialog-vertical3"
                :width="commonData.width"
                top="0"
                center
                style='left:0;top:0'
                :visible.sync="dialogVisible6"
                >
               <component :is="commonData.component" :commonData="commonData"  v-if="dialogVisible6" :style="commonListData.height"  @openWin="openWin2"></component>
                
            </el-dialog>

            <el-dialog
            title="修改密码"
            :visible.sync="dialogVisible"
            append-to-body
            width="30%"
            >
            
            <el-form ref="form"  label-width="80px">
                <el-form-item label="旧密码">
                    <el-input v-model="oldPwd" show-password></el-input>
                </el-form-item>
            </el-form>
             <el-form ref="form"  label-width="80px">
                <el-form-item label="新密码">
                    <el-input v-model="newPwd" show-password></el-input>
                </el-form-item>
            </el-form>
             <el-form ref="form"  label-width="80px">
                <el-form-item label="确认密码">
                    <el-input v-model="newPwd2" show-password></el-input>
                </el-form-item>
            </el-form>
             <el-alert
                title="密码中必须包含字母（不区分大小写）、数字，至少8个字符，最多30个字符"
                type="error"
                show-icon>
            </el-alert>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="updatePwdHt">确 定</el-button>
            </span>
            </el-dialog>
            <el-dialog
            title="修改密码"
            :visible.sync="dialogVisiblepwd"
            append-to-body
            class="updatepwds"
            width="30%"
            >
            
            <el-form ref="form"  label-width="80px">
                <el-form-item label="旧密码">
                    <el-input v-model="oldPwd" show-password></el-input>
                </el-form-item>
            </el-form>
             <el-form ref="form"  label-width="80px">
                <el-form-item label="新密码">
                    <el-input v-model="newPwd" show-password></el-input>
                </el-form-item>
            </el-form>
             <el-form ref="form"  label-width="80px">
                <el-form-item label="确认密码">
                    <el-input v-model="newPwd2" show-password></el-input>
                </el-form-item>
            </el-form>
             <el-alert
                title="密码中必须包含字母（不区分大小写）、数字，至少8个字符，最多30个字符"
                type="error"
                show-icon>
            </el-alert>
            
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="updatePwdHt">确 定</el-button>
            </span>
            </el-dialog>


            <el-dialog
            title="软件设置"
            :visible.sync="dialogVisible7"
            append-to-body
            width="30%"
            >
            
            <el-switch
                v-model="set.freshTab"
                inactive-text="系统选项卡选择重新刷新页面">
            </el-switch>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible7 = false">关闭</el-button>
            </span>
            </el-dialog>

            </el-main>
        </el-container>

    </el-container>

</template>
<script>
import TabComponent  from '../../components/common/TabComponent'
import PrintSelect  from '../common/print/PrintSelect'
import CommonEdit  from '../CommonEdit.vue'
import CommonView  from '../CommonView.vue'
import List  from '../List.vue'
import VueGridLayout from 'vue-grid-layout';
import waterMark from '../../utils/waterMark'
export default {
    components: { 
        TabComponent,
        CommonEdit,
        CommonView,
        PrintSelect,
        List,
        GridLayout: VueGridLayout.GridLayout,
        GridItem: VueGridLayout.GridItem
    },
    data(){
        return{
            set:{
                freshTab:true
            },
            logo:sessionStorage.getItem("logo"),
            colors:sessionStorage.getItem("color"),
            color:"",
            color2:"",
            defaultOpends:[],//默认展开菜单
            notice:[],//右上角的提示
            isCollapse:false,//菜单是否收缩
            mainTitle:sessionStorage.getItem("title"),
            asideWidth:'200px',
            collapseText:"收缩菜单",
            notice_total:0,
            isactive:-1,
            logoImg:"../../assets/logo.png",
            modelAllClassName:"model_item model_active",
            isMain:"",//是否有上一级
            commonData:{
                width:"80%",
                height:"height:60VH",
                left:"0%",
                top:"0%"
            },
            commonListData:{
                title:"",
                appid:"",
                key:"",
                model:"",
                width:"80%",
                height:"height:60VH",
                left:"0%",
                top:"0%"
            },
            mainModel:[],
            commonEditData:{
                fieldPath:"",
                filename2:"",
                sId:"",
                pId:"",
                param_key:"",
                appid:"",
               
                title:"",
                params:{},
                exData:{},
                exId:"",
                width:"95%",
                left:"0%",
                top:"0%",
                ids:"",
                height:"height:100%",
                paramVals:""
            },
            commonEditData2:{
                fieldPath:"",
                filename2:"",
                sId:"",
                param_key:"",
                appid:"",
                title:"",
                exId:"",
                params:{},
                exData:{},
                width:"95%",
                left:"0%",
                top:"0%",
                ids:"",
                height:"height:80VH",
                paramVals:""
            },
            dialogVisiblepwd:false,
            dialogVisible2:false,
            dialogVisible3:false,
            dialogVisible3_view:false,
            dialogVisible4:false,
            dialogVisible5:false,
            dialogVisible6:false,
            dialogVisible7:false,
            modelId:'',
            filename:"",
            activeName:0,
            isDesktop:"N",
            desktop:[],
            desktopMain:[],
            title:'',
            title1:"",
            title2:'',
            titles:'',
            oldId:'',
            oldtitle:'',
            bar:[],
            loading:false,
            loading2:false,
            loading3:false,
            editableTabs:[],
            editableTabsValue:'',
            editableTabsOldValue:'',
            routerAlive:true,//目前不用
            key:'',//用于router-view，切换的时候重新加载
            isGoSearch:'N',//已经不用
            oldPwd:'',
            newPwd:'',
            newPwd2:'',
            isClose:'N',
            dialogVisible:false,
            isFolder:'N',//看是否启用二级菜单，目前最多二级
            wins:{},//记录子页面是由哪个父页面url打开的，解决保存刷新问题
            goSearchWin:[],//哪些窗口需要刷新,解决保存刷新问题
            closeWin:[],//哪些窗口被关闭，解决下一次打开的时候，还是老界面
            winTops:{},//记录各个页面的滚动条，好方便切换回来的时候，列表界面滚动条还在老位置
            scrollTop:'',//当前页面的滚动条位置
            winKey:[],//记录各个页面的router key值，主要是针对commonEdit页面，关闭后新打开的页面加了时间戳，但切换选项卡的时候，没有记录这个时间戳导致key又变成没有时间戳的那个key
            winRecord:{},
            windowModel:[{
                text:'',
                dialogVisible:false,
                width:'',
                height:'',
                url:''
            }],
            buttonJson:[],
            username:'',
            routerLoading:false,
            openWinList:[],//已打开的窗口（选项卡）集合
            desktops:[],//桌面集合
            notice_appid:"",
            notice_url:"",
            isNotice:"Y",
            noTitleMenu:sessionStorage.getItem("noTitleMenu"),
            toKey:"",//跳转list的key；目前用于消息点击跳转
            toModel:"",//跳转list的model；目前用于消息点击跳转
            asideActive:"",
            isDevOps:false,
            isDevOpsSet:"N"
        }
    },
    provide: function () {
        return {
            openWin2: this.openWin2
           
        }
    },
    mounted(){
    // 你要的内容
        if(localStorage.getItem("isWater")=="Y"&&sessionStorage.getItem("hasWater")!="Y")
            waterMark.set( localStorage.getItem("username"))
    },
    created(){
        try{
            if(this.colors){
                let colorss=this.colors.split(",")
                this.color=colorss.length>0 ? colorss[0]:"";
                this.color2=colorss.length>1 ? colorss[1]:colorss[0]
            }
            
           // alert(this.colors+"=="+this.color+"=="+this.color2)
        }catch(e){}
        if(sessionStorage.getItem("isDevOps")){
            this.isDevOps=sessionStorage.getItem("isDevOps")
        }
        if(sessionStorage.getItem("isDevOpsSet")){
            this.isDevOpsSet=sessionStorage.getItem("isDevOpsSet")
        }
      
        if(localStorage.getItem("set_freshTab")){
            this.set.freshTab=localStorage.getItem("set_freshTab")=="Y" ? true:false
        }
        if(sessionStorage.getItem("isUpdatePwd")=='Y'){
            this.dialogVisiblepwd=true;
        }
        if(sessionStorage.getItem("mainModel")){
            this.mainModel=JSON.parse(sessionStorage.getItem("mainModel"))
        }
        if(sessionStorage.getItem("logo")){
            this.logoImg=sessionStorage.getItem("logo")
        }
        if(!this.color){
            this.color="#046fc1"
        }
        if(!this.color2){
            this.color2="#046fc1"
        }
        document.documentElement.style.fontSize = '14px';  
        let sef=this;
         /*window.setInterval(function(){
            sef.fnDate();
        },1000);*/
        this.username=localStorage.getItem("username");
        this.title = this.$route.query.title;

        this.filename=this.$route.query.filename;

        this.title1=this.$route.query.title;
        if(this.$route.query.isDesktop){
            this.isDesktop=this.$route.query.isDesktop;
        }
        if(this.$route.query.toKey){
            this.toKey=this.$route.query.toKey;
        }
        if(this.$route.query.toModel){
            this.toModel=this.$route.query.toModel;
        }
        if(this.$route.query.isMain){
            this.isMain=this.$route.query.isMain;
        }
        document.title=this.title;
        this.title2=this.title;
       this.loadData(true);
       this.getNotice();
       window.setInterval(function(){
            sef.loadNotice();
       },60000)
      
    },
    updated(){
     /* if(this.desktop.length==0){
          //this.loadData(true);
      }
       if(this.$route.query.oldId)
        this.oldId=this.$route.query.oldId;
        if(this.$route.query.oldtitle)
       this.oldtitle=this.$route.query.oldtitle;
        this.title = this.$route.query.title;
        if(this.$route.query.titles)
            this.titles = this.$route.query.titles;

       
        this.title2=this.title;
        this.title1=this.oldtitle;*/
    },
    
    methods:{
        collapseAside(){
            if(this.collapseText=="收缩菜单"){
                this.isCollapse=true;
                this.asideWidth="60px";
                this.collapseText="展开菜单"
            }else{
                this.isCollapse=false;
                this.asideWidth="200px";
                this.collapseText="收缩菜单"
            }
        },
        getNotice(){
             this.$post("business","api/view/getDesktopData",{filename:this.filename}).then(data=>{
                if(data.notice){
                    this.notice_appid=data.notice.appid;
                    this.notice_url=data.notice.url;
                    this.isNotice=data.notice.isNotice;
                    let sef=this;
                    if(this.isNotice=="N"){
                        window.setInterval(function(){
                            sef.getNoticeDetail();
                        },15000)
                    }else{
                        sef.getNoticeDetail();
                    }
                    //window.setInterval(function(){
                        
                   // },8000)
                    
                }
                
            })
        },
        getNoticeDetail(){
           // alert(sessionStorage.getItem("token"));
          
            if(this.notice_appid&&this.notice_url&&sessionStorage.getItem("token")){
                
                this.$post(this.notice_appid,this.notice_url,{}).then(data=>{
                    if(this.isNotice=="N"){
                        for(let i=0;i<data.data.length;i++){
                            let sn_ex2=data.data[i].sn_ex2;
                            this.$notify({
                                title: '公告信息',
                                message: sn_ex2,
                                duration:0
                            });
                        }
                        
                    }else{
                        this.notice=data.data;
                        this.notice_total=Number(data.total);
                    }
                    
                })
            }
        },
        goSearch(data){
            let datas=JSON.parse(data);
            let url=this.wins[this.editableTabsValue];
            this.goSearchWin.push(url);
        },
        goSearch2(data){
            
           this.$refs.routers.initData();
           this.getNotice();//重新获取右上角数字
           if(this.dialogVisible5){
               this.$refs.commonListNotice.initData();//刷新提醒的列表
           }
        },
        goSearch3(data){
            
            let item=JSON.parse(data);
           
            if(item.isSearch=='Y'){
                 this.$refs.commonEdits.loadDatas(false);
                 
                 //this.$refs.commonEdits.loadDatas3(false);
            }else
                 this.$refs.commonEdits.loadDatas3(false);
        },
        closeWinView(data){
           
            this.dialogVisible3_view=false;
        },
        beforeLeaveTab(){
            if(this.isClose!='Y'){
                this.editableTabsOldValue=this.editableTabsValue;
            }else
                this.isClose='N';
            
        },
        initScroll(){
            let scrollTop=0;
          
            try{
                scrollTop=this.$refs.routers.getScrollTop();
               
                this.winTops[this.getKeys(this.editableTabsOldValue)]=scrollTop;
                //this.scrollTop=this.winTops[this.getKeys(this.editableTabsValue)]
            }catch(e){
                this.scrollTop=0;
            }
           
        },
        getKeys(path){
            let params={};
            let index=path.indexOf("?");
            let path_=path.substring(index+1).split("&");
            for(let i=0;i<path_.length;i++){
                let param=path_[i].split("=");
                params[param[0]]=param[1];
            }
            return params["sKey"];
        },
        tabClick(tab){
            
            let path = tab.name;
           /* if(this.isGoSearch=='Y'){
                var timestamp = (new Date()).getTime()/1000;
                path=path+"&timestamp="+timestamp;
                this.isGoSearch='N';
            }*/
           
            //this.editableTabsOldValue=this.editableTabsValue;//在离开的时候，已经赋值了，这里不用了，赋值反而有问题
            if(path!=this.editableTabsOldValue){
                this.editableTabsValue=path;
                this.loadTab2(path);
            }
           
        },
        loadTab(path){
            this.routerAlive=false;
           
            path=path.replace("/desktopList","/byg/tabMain/desktopList")
            path=path.replace("/list","/byg/tabMain/list")
            path=path.replace("/listArea","/byg/tabMain/listArea")
            path=path.replace("/listComplex","/listComplex")
            path=path.replace("/listDouble","/byg/tabMain/listDouble")
            path=path.replace("/cemetery","/byg/tabMain/cemetery")
            path=path.replace("/cemeterySet","/byg/tabMain/cemeterySet")
            path=path.replace("/ltView","/byg/tabMain/ltView")
            path=path.replace("/optionSet","/byg/tabMain/optionSet")
            path=path.replace("/role","/byg/tabMain/role")
            path=path.replace("/role","/byg/tabMain/optionSet")
            path=path.replace("/printSet","/byg/tabMain/printSet")
            path=path.replace("/gmMap","/byg/tabMain/gmMap")
            //path=path.replace("/gps","/byg/tabMain/gps")
            path=path.replace("gps","/byg/tabMain/gps")
            if(path.indexOf("http://")!=-1||path.indexOf("https://")!=-1){
                path="/byg/tabMain/extendUrl?url="+escape(escape(path));
            }
            if(path.indexOf("?")!=-1)
                path=path+"&title="+this.title+"&filename="+this.filename+"&isDesktop="+this.isDesktop+"&isMain="+this.isMain;
            else
                path=path+"?title="+this.title+"&filename="+this.filename+"&isDesktop="+this.isDesktop+"&isMain="+this.isMain; 
            //path=path+"&modelId="+this.modelId+"&title="+this.title+"&oldId="+this.oldId+"&oldtitle="+this.oldtitle
            var timestamp = (new Date()).getTime()/1000;
           // path=path+"&timestamp="+timestamp;
            this.key=path;
            this.routerAlive=true;
            this.key=this.editableTabsValue;
            
            this.openWinList.push(this.editableTabsValue);
            this.initScroll();
            if (this.$route.path !== path) {
                 this.$router.push({path: path});
                 
            }
           
        },
        loadTab2(path){ 
           
            let isGoSearch="N";
            let goSearchIndex=-1;
            let isEdit="N";

            for(let i=0;i<this.goSearchWin.length;i++){
                if(this.goSearchWin[i]==path){
                    isGoSearch='Y';
                    goSearchIndex=i;
                }
            }
            if(goSearchIndex>=0){
                this.goSearchWin.splice(goSearchIndex,1);
            }

            let isCloses="N";
            let closeIndex=-1;
            for(let i=0;i<this.closeWin.length;i++){
                if(this.closeWin[i]==path){
                    isCloses='Y';
                    closeIndex=i;
                }
            }
           
            if(closeIndex>=0){
                this.closeWin.splice(closeIndex,1);
            }
            if(path.indexOf("commonEdit")!=-1&&isCloses=='Y'){
                isEdit="Y";
            }
            let isList="N";
            if(path.indexOf("list")!=-1){
                isList="Y";
            }
            this.routerAlive=false;
            path=path.replace("/list","list")
            path=path.replace("/listArea","listArea")
            path=path.replace("/listComplex","listComplex")
            path=path.replace("/listDouble","listDouble")
            path=path.replace("/commonPrint","commonPrint")
            path=path.replace("/commonEdit","commonEdit")
            path=path.replace("/commonView","commonView")
            path=path.replace("/cemetery","cemetery")
            path=path.replace("/cemeterySet","cemeterySet")
            path=path.replace("/ltView","ltView")
            path=path.replace("/role","role")
            path=path.replace("/optionSet","optionSet")
            path=path.replace("/printSet","printSet")
            path=path.replace("/desktopList","desktopList")
            path=path.replace("/gmMap","/byg/tabMain/gmMap")
            //path=path.replace("room","/byg/tabMain/room")
            if((path.indexOf("http://")!=-1||path.indexOf("https://")!=-1)&&path.indexOf("isextend=Y")!=-1){
                window.open(path, '_blank')
                return;
            }
            

            if(path.indexOf("http://")!=-1||path.indexOf("https://")!=-1){
               
                path="extendUrl?url="+escape(escape(path));
            }
            
            path=path+"&title="+this.title+"&filename="+this.filename+"&isDesktop="+this.isDesktop+"&isMain="+this.isMain;
            //path=path+"&modelId="+this.modelId+"&title="+this.title+"&oldId="+this.oldId+"&oldtitle="+this.oldtitle;
            var timestamp = (new Date()).getTime()/1000;
            let key=this.editableTabsValue;
           
            if(this.winKey[this.editableTabsValue]&&isEdit!="Y"){
                key=this.winKey[this.editableTabsValue];
            }
           
            if(isEdit=='Y'){
                key=key+"&timstamp="+timestamp;
            }
           // alert(key)
            this.winKey[this.editableTabsValue]=key;
            /*if(this.isGoSearch=='Y'){
                var timestamp = (new Date()).getTime()/1000;
                path=path+"&timestamp="+timestamp;
                this.isGoSearch='N';
            }*/
            
           this.initScroll();
           this.scrollTop=this.winTops[this.getKeys(this.editableTabsValue)];
           
            let params={};
            let index=path.indexOf("?");
            let path_=path.substring(index+1).split("&");
            for(let i=0;i<path_.length;i++){
                let param=path_[i].split("=");
                params[param[0]]=param[1];
            }
            
            this.key=key;
            this.routerAlive=true;
            //console.log("path==="+path);
           // console.log(params);
          
            this.$router.push({path: path.substring(0,index),query:params});
           
            //this.$refs.list.scrollTop=this.scrollTop;
            let sef=this;
            if(isList=='Y'&&isCloses=='N')
                this.routerLoading=true;
            window.setTimeout(function(){
                
                 try{
                    /*if(isList=='Y'){
                        console.log("winRecord====="+params.sKey);
                        console.log(ef.winRecord)
                        if(sef.winRecord[params.sKey]!='Y'){
                            sef.$refs.routers.setParams(params)
                            sef.winRecord[params.sKey]='Y'
                        }
                    }*/
                    try{
                        
                        if(isCloses=='N'){
                            try{
                            sef.$refs.routers.setScrollTop(sef.scrollTop)
                            }catch(e){}
                        
                        }else{
                           
                           // sef.$refs.routers.initData();
                        }
                        if(sef.openWinList.includes(sef.editableTabsValue)){
                            if(sef.set.freshTab)
                                sef.$refs.routers.initData();
                        }else
                            sef.openWinList.push(sef.editableTabsValue);
                    }catch(e){}
                   
                    if(sef.routerLoading){
                        sef.routerLoading=false;
                    }
                    
                    if(isGoSearch=='Y'){
                        sef.$refs.routers.goSearch()
                    }
                }catch(e){}
            },1000)
           
           
         //   try{
                
          //  }catch(e){}
        },
        changeFilename(item){
            if(item.notPre!="Y"){
                this.filename=item.filename;
                this.title1=item.text;
                this.isDesktop=item.isDesktop;
                
                this.loading3=false;
                this.loadData(true);
                /*this.$refs.routers.reloadData(item.filename)*/
               // let url= "/#/byg/tabMain?title="+item.text+"&filename="+item.filename+"&isDesktop="+item.isDesktop+"&isMain=Y"
                
                
               
            }
            
        },
        loadData(isOk){
             let imgIp=localStorage.getItem("imgIp");
            let sef=this;
            /**获取桌面模块，目前定义所有的模块显示，没有设置自主模块 */
            this.$post('api','api/model/getUserModelsByJson',{filename:escape(this.filename)}).then(res=>{
                
                sef.loading3=true;
                let nav=JSON.parse(unescape(res[0].nav));
                sef.desktop=[];
                sef.desktopMain=[];
                sef.isFolder=res[0].isFolder;
                sef.isFolder="Y"
                sef.editableTabs=[],
                sef.editableTabsValue='';
                sef.editableTabsOldValue='';

                for(let i=0;i<nav.length;i++){
                    let n=nav[i];
                    n.icon=imgIp+n.icon;
                    for(let h=0;h<n.children.length;h++){
                        n.children[h].icon=imgIp+n.children[h].icon;
                    }
                    let className="model_item";
                    if(i==0)
                        className="model_item ";
                    n.className=className;


                    sef.desktopMain.push(n);
                    
                    if(i==0){
                        try{
                            if(n.desktop){
                                sef.desktops=n.desktop;
                            }
                            
                        }catch(e){}
                    }
                   
                    if(isOk){
                        if(i==0){
                            let data_={};
                            if(n.children.length==0){
                                
                                data_=n;
                            //  this.$router.push({path: n.url});
                            }else if(n.children[0].children&&n.children[0].children.length>0){
                                 data_=n.children[0].children[0];
                                //this.$router.push({path: n.children[0].url});
                            }else{
                                data_=n.children[0];
                                //this.$router.push({path: n.children[0].url});
                            }

                            if(data_.url.indexOf("ip/")!=-1){
                        
                                const token=sessionStorage.getItem("token");
                                let ip=localStorage.getItem("ip");
                                data_.url=data_.url.replace("ip",ip);
                                data_.url=data_.url.indexOf("?")==-1 ? data_.url+"?token="+token:data_.url+"&token="+token;
                            }
                            let data={};
                            data.name=data_.url;
                            data.title=data_.text;
                            data.src=data_.url;
                            sef.editableTabs=[];
                            let path = data_.url;
                            if(path.indexOf("?")==-1){
                                path=path+"?appid="+data_.appid+"&company="+localStorage.getItem("company")+"&key="+data_.key+"&dbModelkey="+data_.dbModelkey+"&model="+data_.model;
                            }else{
                                path=path+"&appid="+data_.appid+"&company="+localStorage.getItem("company")+"&key="+data_.key+"&dbModelkey="+data_.dbModelkey+"&model="+data_.model;
                            }
                           
                          
                           if(this.isDesktop!="Y"){
                                sef.editableTabsValue=path;
                                sef.editableTabs.push({
                                    title: data_.text,
                                    name: path,
                                    src: path
                                });
                                this.loadTab(path);
                           }else{
                               
                                sef.editableTabsValue="/desktopList";
                                sef.editableTabs.push({
                                    title: "桌面",
                                    name: "/desktopList",
                                    src: "/desktopList"
                                });
                                sef.loadTab("/desktopList?company="+localStorage.getItem("company"));
                               // alert(2)
                           }
                            /*if(sef.desktops.length==0){
                                sef.editableTabsValue=path;
                                sef.editableTabs.push({
                                    title: data_.text,
                                    name: path,
                                    src: path
                                });
                                this.loadTab(path);
                            }else{
                                let desktopData=JSON.stringify(sef.desktops);
                                sef.editableTabsValue="/desktopList?data="+desktopData;
                                sef.editableTabs.push({
                                    title: "桌面",
                                    name: "/desktopList?data="+desktopData,
                                    src: "/desktopList?data="+desktopData
                                });
                                sef.loadTab("/desktopList?data="+desktopData);
                               
                                
                            }
                            */
                            
                        }
                    }
                    
                    sef.loading2=false;
                }
                
                //sef.desktop.push(sef.desktopMain[0]);
                this.desktop=nav;
                //this.desktopMain=[];
                this.defaultOpends.push(this.desktop[0].key)
                //sef.changeMenu(0);
                sef.loading=false;
            });

           
        },
        handleNodeClick(data) {
        },
        openUrl(item,index){
            this.src=item.url;
            this.addTab(item);
            if(index==0||index){
                this.isactive=index;
            }
           // console.log(item,"itemkeyss=======")
            this.asideActive=item.key;
        },
        removeTab(targetName) {
            if(targetName.indexOf("/desktopList")!=-1){
                
                this.$message.error('桌面不能关闭');
                return;
            }
           /* if(this.openWinList.length==1){
                this.$message.error('必须至少有一个页面');
                return;
            }*/
            let tabs = this.editableTabs;
            let activeName = this.editableTabsValue;
           
            this.closeWin.push(activeName);
            if (activeName === targetName) {
                tabs.forEach((tab, index) => {
                    if (tab.name === targetName) {
                    let nextTab = tabs[index + 1] || tabs[index - 1];
                    if (nextTab) {
                        activeName = nextTab.name;
                    }
                    }
                });
            }
            this.isClose="Y";
            //this.isGoSearch="Y";
            this.openWinList.splice(this.editableTabsValue);
            this.editableTabsValue = activeName;
            //alert(this.editableTabsValue);
            this.loadTab2(this.editableTabsValue)
            this.editableTabs = tabs.filter(tab => tab.name !== targetName);
            let index=this.editableTabs.length-2;
            index=index<0 ? 0:index;
            this.editableTabsOldValue=this.editableTabs[index].src;
        },
        opened(){
          //  alert(2)
            let sef=this;
           // window.setTimeout(function(){
                let maxWidth=document.body.clientWidth;
                let maxHeight=document.body.clientHeight;

                let width=sef.commonEditData.width;
                let height=sef.commonEditData.height;
                if(width.indexOf("px")!=-1){
                    let left=(maxWidth-Number(width.replace("px","")))/2
                    let top=(maxHeight-Number(height.replace("px","").replace("height:","")))/2
                    let els=document.getElementsByClassName("dialog-vertical")[document.getElementsByClassName("dialog-vertical").length-1];
                    let els2=els.getElementsByClassName("el-dialog")[0];
                   // els2.style.left=left+"px";
                   // els2.style.top=top+"px";
                }else{
                    let els=document.getElementsByClassName("dialog-vertical")[document.getElementsByClassName("dialog-vertical").length-1];
                    let els2=els.getElementsByClassName("el-dialog")[0];
                  //  els2.style.left=sef.commonEditData.left.replace("VH","%").replace("vh","%");
                   // els2.style.top=sef.commonEditData.top.replace("VH","%").replace("vh","%");
                }
               
           // },1000)
        },
        opened2(){
            let sef=this;
           // window.setTimeout(function(){
                let maxWidth=document.body.clientWidth;
                let maxHeight=document.body.clientHeight;

                let width=sef.commonEditData2.width;
                let height=sef.commonEditData2.height;
                if(!width||width==undefined){
                    width="90%"
                    sef.commonEditData2.width="90%"
                }
                if(!height||height==undefined){
                    height="80VH"
                    sef.commonEditData2.height="80VH"
                }
                if(width.indexOf("px")!=-1){
                    let left=(maxWidth-Number(width.replace("px","")))/2
                    let top=(maxHeight-Number(height.replace("px","").replace("height:","")))/2
                    let els=document.getElementsByClassName("dialog-vertical2")[document.getElementsByClassName("dialog-vertical2").length-1];
                    let els2=els.getElementsByClassName("el-dialog")[0];
                  //  els2.style.left=left+"px";
                  //  els2.style.top=top+"px";
                }else{
                    let els=document.getElementsByClassName("dialog-vertical2")[document.getElementsByClassName("dialog-vertical2").length-1];
                    let els2=els.getElementsByClassName("el-dialog")[0];
                 
                   // els2.style.left=sef.commonEditData2.left.replace("VH","%").replace("vh","%");
                   // els2.style.top=sef.commonEditData2.top.replace("VH","%").replace("vh","%");
                }
               
           // },1000)
        },
        opened3(){
            let sef=this;
           // window.setTimeout(function(){
                let maxWidth=document.body.clientWidth;
                let maxHeight=document.body.clientHeight;

                let width=sef.commonListData.width;
                let height=sef.commonListData.height;
                if(width.indexOf("px")!=-1){
                    let left=(maxWidth-Number(width.replace("px","")))/2
                    let top=(maxHeight-Number(height.replace("px","").replace("height:","")))/2
                    
                    let els=document.getElementsByClassName("dialog-vertical3")[document.getElementsByClassName("dialog-vertical3").length-1];
                    let els2=els.getElementsByClassName("el-dialog")[0];
                  //  els2.style.left=left+"px";
                   // els2.style.top=top+"px";
                }else{
                    let els=document.getElementsByClassName("dialog-vertical3")[document.getElementsByClassName("dialog-vertical3").length-1];
                    let els2=els.getElementsByClassName("el-dialog")[0];
                 //   els2.style.left=sef.commonListData.left.replace("VH","%").replace("vh","%");
                  //  els2.style.top=sef.commonListData.top.replace("VH","%").replace("vh","%");
                }
               
           // },1000)
        },
        openWinEdit(data){
            console.log(data,"s===================")
            let item=JSON.parse(data);
           
            this.commonEditData2=item;
            this.dialogVisible4=true;
        },
        commonEditClose(){
            try{
                this.$refs.commonEdits.closes();
            }catch(e){}
        },
        openWin2(item){
           //alert(22)
           
            let items=JSON.parse(item);
             console.log(items,"openWin2=======================")
            if(items.url.indexOf("commonEdit")!=-1){
                this.dialogVisible5=false;
                this.dialogVisible6=false;
                if(this.dialogVisible3){
                    this.dialogVisible3=false;
                    let sef=this;
                    window.setTimeout(function(){
                        sef.openWin3(item);
                    },1000)
                }else{
                    this.openWin3(item)
                }
            }else if(items.url.indexOf("commonView")!=-1){
                this.dialogVisible5=false;
                this.dialogVisible6=false;
                if(this.dialogVisible3_view){
                    this.dialogVisible3_view=false;
                    let sef=this;
                    window.setTimeout(function(){
                        sef.openWin3_view(item);
                    },1000)
                }else{
                    this.openWin3_view(item)
                }
            }else if(items.isList=="Y"||(items.url.indexOf("/list")!=-1&&items.url.indexOf("/listComplex")==-1)){
                this.commonListData.title=items.buttonName;
                this.commonListData.appid=items.appid;
                this.commonListData.model=items.model;
                this.commonListData.key=items.key;
                this.commonListData.exId=items.exId;
                if(item.searchs){
                    this.commonListData.searchs=item.searchs
                }
                this.dialogVisible5=true;
            }else if(items.isComponent=="Y"){
                this.commonData.component=items.component;
                this.commonData.title=items.buttonName;
                this.commonData.appid=items.appid;
                this.commonData.model=items.model;
                this.commonData.key=items.key;
                this.commonData.printName=items.printName;
                this.commonData.sId=items.sId;
                this.commonData.ids=items.ids;
                this.dialogVisible6=true;
            }else{
                
                //console.log(items,"itemss===========")
                this.openWin(JSON.stringify(items))
            }
            
            
            
        

            /*
            this.$set("commonEditData","fieldPath",item.fieldPath);
            this.$set("commonEditData","filename2",item.filename2);
            this.$set("commonEditData","appid",item.appid);
            this.$set("commonEditData","param_key",item.param_key);
            this.$set("commonEditData","title",item.buttonName);*/
        },
        openWin3(item){
            item=JSON.parse(item);
            this.dialogVisible3=true;
            this.commonEditData={
                fieldPath:"",
                filename2:"",
                sId:"",
                pId:"",
                param_key:"",
                appid:"",
                title:"",
                params:{},
                exId:"",
                width:"95%",
                left:"0%",
                top:"0%",
                ids:"",
                height:"height:100%",
                exHeight:"",
                paramVals:"",
                marginTop:"0"
            };
            this.commonEditData.fieldPath=item.fieldPath;
            this.commonEditData.filename2=item.filename2;
            this.commonEditData.appid=item.appid;
            this.commonEditData.param_key=item.param_key;
            this.commonEditData.title=item.buttonName;
            this.commonEditData.sId=item.sId;
            this.commonEditData.pId=item.pId;
            this.commonEditData.params=item.params;
            this.commonEditData.exData=item.exData;
            this.commonEditData.exId=item.exId;
            if(item.paramVals)
                this.commonEditData.paramVals=item.paramVals;
            if(item.ids){
                this.commonEditData.ids=item.ids;
            }
            if(item.width)
                this.commonEditData.width=item.width.replace("VH","%").replace("vh","%");
            if(item.left)
                this.commonEditData.left=item.left;
            if(item.top){
                this.commonEditData.top=item.top;
            }
            
            if(item.height){
               
                this.commonEditData.height="height:"+item.height;
                if(item.height.indexOf("px")!=-1){
                    let h=item.height.replace("px","");
                    this.commonEditData.exHeight=(Number(h)+50)+"px"
                    let hh=(Number(h)+50);
                    let clientHeight=document.documentElement.clientHeight
                    let top=(clientHeight-hh)/2;
                    this.commonEditData.marginTop=top+"px"
                   
                    if(top<0){
                        let h_=item.height.replace("px","");
                        let h2=(Number(h_)+top-150);
                       
                        this.commonEditData.height="height:"+h2+"px;";
                        this.commonEditData.exHeight=(Number(h2)+50)+"px"
                        let top2=(clientHeight-h2-50)/2;
                        this.commonEditData.marginTop=top2+"px"

                        if(top2<0){
                            this.commonEditData.height="";
                            this.commonEditData.exHeight="";
                            this.commonEditData.marginTop="";
                        }
                    }

                }
                
            }
                
          
            //console.log(this.commonEditData,"this.commonEditData=============================================================")
        },
        openWin3_view(item){
            item=JSON.parse(item);
            this.dialogVisible3_view=true;
            this.commonEditData={
                fieldPath:"",
                filename2:"",
                sId:"",
                pId:"",
                param_key:"",
                appid:"",
                title:"",
                params:{},
                exId:"",
                width:"95%",
                left:"0%",
                top:"0%",
                ids:"",
                height:"height:100%",
                exHeight:"",
                paramVals:"",
                marginTop:"0"
            };
            this.commonEditData.fieldPath=item.fieldPath;
            this.commonEditData.filename2=item.filename2;
            this.commonEditData.appid=item.appid;
            this.commonEditData.param_key=item.param_key;
            this.commonEditData.title=item.buttonName;
            this.commonEditData.sId=item.sId;
            this.commonEditData.pId=item.pId;
            this.commonEditData.params=item.params;
            this.commonEditData.exData=item.exData;
            this.commonEditData.exId=item.exId;
            if(item.paramVals)
                this.commonEditData.paramVals=item.paramVals;
            if(item.ids){
                this.commonEditData.ids=item.ids;
            }
            if(item.width)
                this.commonEditData.width=item.width.replace("VH","%").replace("vh","%");
            if(item.left)
                this.commonEditData.left=item.left;
            if(item.top){
                this.commonEditData.top=item.top;
            }
            
            if(item.height){
               
                this.commonEditData.height="height:"+item.height;
                if(item.height.indexOf("px")!=-1){
                    let h=item.height.replace("px","");
                    this.commonEditData.exHeight=(Number(h)+50)+"px"
                    let hh=(Number(h)+50);
                    let clientHeight=document.documentElement.clientHeight
                    let top=(clientHeight-hh)/2;
                    this.commonEditData.marginTop=top+"px"
                   
                    if(top<0){
                        let h_=item.height.replace("px","");
                        let h2=(Number(h_)+top-150);
                       
                        this.commonEditData.height="height:"+h2+"px;";
                        this.commonEditData.exHeight=(Number(h2)+50)+"px"
                        let top2=(clientHeight-h2-50)/2;
                        this.commonEditData.marginTop=top2+"px"

                        if(top2<0){
                            this.commonEditData.height="";
                            this.commonEditData.exHeight="";
                            this.commonEditData.marginTop="";
                        }
                    }

                }
                
            }
                
          
            //console.log(this.commonEditData,"this.commonEditData=============================================================")
        },
        openWin(item){
            item=JSON.parse(item);
            
            /*let width=item.width;
            let height=item.height;
            width=width=="" ? "90%":width;
            height=height=="" ? ""+(document.documentElement.clientHeight*0.84):height;
            width=width.indexOf("%")==-1 ? width+"px":width;
            height=height.indexOf("%")==-1 ? height+"px":height;
            this.windowModel[0]['dialogVisible']=true;
            this.windowModel[0]['url']=item.url;
            this.windowModel[0]['text']=item.buttonName;
            this.windowModel[0]['icon']=item.icon;
            this.windowModel[0]['width']=width;
            this.windowModel[0]['height']=height;
            this.windowModel[0]['id']=item.id;
            this.bindDialogEvent(0);*/
            if(item.child&&item.child.length>0){
                this.dialogVisible2=true;
                this.buttonJson=item.child;
            }else{
                item.text=item.buttonName;
                this.addTab(item)
                this.dialogVisible2=false;
            }
            

        },
        openDesktop(){
            let item={};
            item.text="桌面";
            item.url="/desktopList?company="+localStorage.getItem("company")
            this.addTab(item)
        },
        addTab(item) {
            let isOpen=true;
            if(item.url.indexOf("ip/")!=-1){
                
                const token=sessionStorage.getItem("token");
                let ip=localStorage.getItem("ip");
                item.url=item.url.replace("ip",ip);
                item.url=item.url.indexOf("?")==-1 ? item.url+"?token="+token:item.url+"&token="+token;
            }
             if(item.url.indexOf("appid")==-1&&item.url.indexOf("/desktopList")==-1){
                if(item.url.indexOf("?")==-1){
                    item.url=item.url+"?appid="+item.appid+"&company="+localStorage.getItem("company")+"&key="+item.key+"&dbModelkey="+item.dbModelkey+"&model="+item.model;
                }else{
                    item.url=item.url+"&appid="+item.appid+"&company="+localStorage.getItem("company")+"&key="+item.key+"&dbModelkey="+item.dbModelkey+"&model="+item.model;
                }
            }
            for(let i=0;i<this.editableTabs.length;i++){
                let names=this.editableTabs[i].name;
               
                if(names==item.url){

                    this.editableTabs[i].src=item.url;
                    isOpen=false;
                }
            }
            if(isOpen){
                this.editableTabs.push({
                    title: item.text,
                    name: item.url,
                    src: item.url
                });
            }
            this.isClose="Y";
            this.editableTabsOldValue=this.editableTabsValue;
            this.editableTabsValue = item.url;
            // var timestamp = (new Date()).getTime()/1000;
            //let url=item.url+"&timestamp2="+timestamp;
            
            this.wins[this.editableTabsValue]=this.editableTabsOldValue;
           
            this.loadTab2(item.url);
        },
         bindDialogEvent(i){/**窗口初始化事件 */
            let sef=this;
            window.setTimeout(function(){
                let el=document.getElementsByClassName("el-dialog__wrapper")[i];
                const dialogEl = el.querySelector('.el-dialog');
                const dialogHeaderEl = el.querySelector('.el-dialog__header');
                const dialogBodyEl =   el.querySelector('.el-dialog__body');
                const dialogFooterEl = el.querySelector('.el-dialog__footer');
                const minmax = el.querySelector('.el-dialog__minmax');
                const closebtn = el.querySelector('.el-dialog__close');
                dialogBodyEl.style.height=sef.windowModel[i].height;
                let height=document.documentElement.clientHeight;
                let height2=Number(sef.windowModel[i].height.replace("px",""));
                let mTop=((height-height2-60)/2);
                mTop=mTop<0 ? 30:mTop
                dialogEl.style.marginTop=mTop+'px';

                
                /**为了解决点击后面的窗口让其可以在最前面显示 */
                el.style.pointerEvents="none";
                dialogHeaderEl.style.pointerEvents="auto";
                dialogBodyEl.style.pointerEvents="auto";
                if(dialogFooterEl)
                    dialogFooterEl.style.pointerEvents="auto";
                dialogBodyEl.onclick=function(){
                    let zIndex=sef.changeIndex();
                    document.getElementsByClassName("el-dialog__wrapper")[i].style.zIndex=zIndex;
                }
               
                if(dialogFooterEl){
                     dialogFooterEl.onclick=function(){
                        let zIndex=sef.changeIndex();
                        document.getElementsByClassName("el-dialog__wrapper")[i].style.zIndex=zIndex;
                    }
                }
                minmax.onclick=function(){
                   
                    sef.windowModel[i]["dialogVisible"]=false;
                }
                closebtn.onclick=function(){
                    sef.windowModel[i]["dialogVisible"]=false;
                    sef.windowModel[i]["isUse"]="N";
                    sef.windowModel[i]["url"]="";
                    sef.windowModel[i]["text"]="";
                    sef.windowModel[i]["icon"]="";
                    sef.barList.splice(i,1);
                }
                dialogBodyEl.style.padding="0";

                document.getElementById("iframe").style.height=sef.windowModel[i].height;
                
            },1000)
        },
        closeWins(datas){
            
           /* let sef=this;
            sef.windowModel[0]["dialogVisible"]=false;
            sef.windowModel[0]["isUse"]="N";
            sef.windowModel[0]["url"]="";
            sef.windowModel[0]["text"]="";
            sef.windowModel[0]["icon"]="";
            sef.barList.splice(i,1);*/
            
            datas=JSON.parse(datas);
            if(datas.closeType=="dialog"){
                this.dialogVisible3=false;
            }else{
                this.closeWin.push(this.editableTabsValue);
                let index=-1;
                for(let i=0;i<this.editableTabs.length;i++){
                    if(this.editableTabs[i].name==this.editableTabsValue){
                        index=i;
                    }
                }
                this.editableTabs.splice(index,1);
                if(this.editableTabsOldValue){
                    let isOk=false;
                    for(let i=0;i<this.editableTabs.length;i++){
                        if(this.editableTabs[i].name==this.editableTabsOldValue){
                            isOk=true;
                        }
                    }
                    if(!isOk){
                        this.editableTabsOldValue=this.editableTabs[this.editableTabs.length-1].src;
                    }

                    this.editableTabsValue=this.editableTabsOldValue;
                    let index=this.editableTabs.length-2;
                    index=index<0 ? 0:index;
                    this.editableTabsOldValue=this.editableTabs[index].src;
                }else{
                    this.editableTabsValue=this.editableTabs[this.editableTabs.length-1].src;
                    let index=this.editableTabs.length-2;
                    index=index<0 ? 0:index;
                    this.editableTabsOldValue=this.editableTabs[index].src;
                }
               
                this.loadTab2(this.editableTabsValue)
            }
            
        },
        closeWins2(data){
            this.dialogVisible4=false;
        },
        changeMenu(index){
            this.desktop=[];
            if(index==-1){
                this.desktop=this.desktopMain;
                this.modelAllClassName="model_item model_active"
                for(let i=0;i<this.desktopMain.length;i++){
                    let className="model_item";
                    
                    this.desktopMain[i].className=className;
                }
            }else{
                this.modelAllClassName="model_item"
                if(this.desktopMain[index].children[0].children.length>0){
               
                    this.desktop=this.desktopMain[index].children;
                    this.isFolder="Y";
                }else{
                    this.desktop=this.desktopMain[index].children;
                    this.isFolder="N";
                }
                for(let i=0;i<this.desktopMain.length;i++){
                    let className="model_item";
                    if(i==index)
                        className="model_item model_active";
                    this.desktopMain[i].className=className;
                }
            }
            
           this.isFolder="Y"
            
        },
        returns(){
            //.log("returns===="+"/main?title="+this.oldtitle+"&modelId="+this.oldId+"&titles="+this.titles)
            if(this.isMain=="Y"){
                let url=sessionStorage.getItem("mainView");
                if(url){
                    this.$router.push({path:url+"?title="+this.oldtitle+"&modelId="+this.oldId+"&titles="+this.titles});
                }else{
                    this.$router.push({path:"/main?title="+this.oldtitle+"&modelId="+this.oldId+"&titles="+this.titles});
                }
            }
                
           // window.location.href=this.bar[this.bar.length-2].url;
        },
        logout(){
            sessionStorage.setItem("token","");
            localStorage.setItem("username","");
            localStorage.setItem("userId","");
            localStorage.setItem("company","");
           this.$router.push({path:"/login?sCode="+localStorage.getItem("sCode")+"&logout=Y"});
            
        },
        sets(){
            this.dialogVisible7=true;
        },
        setDevOps(set){

            this.isDevOps=set;
            sessionStorage.setItem("isDevOps",set)
        },
        updatePwd(){
            this.oldPwd="";
            this.newPwd2="";
            this.newPwd="";
            this.dialogVisible=true;

        },
        updatePwdHt(){
            let isOk=true;
            if(this.newPwd==''){
                isOk=false;
                this.$alert("密码不能为空", '提示', {
                    confirmButtonText: '确定',
                    callback: action => {
                        
                    }
                });
            }
            if(this.newPwd!=this.newPwd2&&isOk){
                isOk=false;
                this.$alert("两次密码不一致，请检查", '提示', {
                    confirmButtonText: '确定',
                    callback: action => {
                        
                    }
                });
            }
            var pwdRegex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,30}')
            if (!pwdRegex.test(this.newPwd)&&isOk) {
                isOk=false;
                this.$alert("密码必须包含字母和数字，并且要大于8位数", '提示', {
                    confirmButtonText: '确定',
                    callback: action => {
                        
                    }
                });
            }
            if(isOk){
                 this.$post("api","api/login/updatePwd",{oldPwd:this.oldPwd,newPwd:this.newPwd}).then(data=>{
                     this.$alert(data[0].msg, '提示', {
                        confirmButtonText: '确定',
                        callback: action => {
                            if(data[0].status=="+OK"){
                                this.dialogVisible=false;
                                this.dialogVisiblepwd=false;
                                if(sessionStorage.getItem("isUpdatePwd")=="Y"){
                                    sessionStorage.setItem("isUpdatePwd","N");
                                    this.$router.push({path:"/login?sCode="+localStorage.getItem("sCode")});
                                }
                            }
                        }
                    });
                     
                })
            }
        },
        openNotice(item){//打开通知的列表界面
            let title=item.title;
            let appid=item.appid;
            let model=item.model;
            let key=item.key;
            this.commonListData.title=title;
            this.commonListData.appid=appid;
            this.commonListData.model=model;
            this.commonListData.key=key;
            this.dialogVisible5=true;
        },
        saveData(){ //虚拟保存按钮
            let data=this.$refs.commonedit2.saveData();
            if(data.isOk){
                this.$refs.commonEdits.saveCommonData(data);
                // this.$refs.commonEdits.$refs.tableEdits[0].saveData(data);//调用tableEdit.vue里的saveData方法
                this.dialogVisible4=false;
            }
           
        },
        fnDate() {
            
            var oDiv = document.getElementById("DateTime");
            var date = new Date();
            var year = date.getFullYear();//当前年份
            var month = date.getMonth();//当前月份
            var data = date.getDate();//天
            var hours = date.getHours();//小时
            var minute = date.getMinutes();//分
            var second = date.getSeconds();//秒
            var time =  this.fnW(hours) + ":" + this.fnW(minute);
            var a = new Array("日", "一", "二", "三", "四", "五", "六");
            var week = new Date().getDay();
            var str = "周" + a[week];
            try{
                oDiv.innerHTML = year + "-" + this.fnW((month + 1)) + "-" + this.fnW(data) + " "+ time + "　" + str+" ";
            }catch(e){}
        },
        //补位 当某个字段不是两位数时补0
        fnW(str){
            return str > 9 ?  str :  "0" + str;},
        loadNotice(){
            if(sessionStorage.getItem("token")){
                this.$post("oa","/notice/getAffiche",{}).then(data=>{
                    for(let i=0;i<data.length;i++){
                        let text=data[i].title;
                        this.$notify({
                            title: '公告信息',
                            message: text,
                            duration:0
                        });
                    }
                    
                });
            }
        }
        
    },
    watch:{
        set:{
            handler: function (newVal) {
                localStorage.setItem("set_freshTab",this.set.freshTab ? "Y":"N")
            },
            deep: true    //深度监听
        }
    }
}
</script>

<style scoped>

 .updatepwds>>>.el-dialog{
        top:35%;
        left:30%;
    }
    .updatepwds>>>.el-dialog__headerbtn{
        display:none !important;
    }
.noMenu{
    margin-left:30px;
    font-size:22px;
    line-height:60px !important;
}
.noMenu img{
    width:38px !important;
}
.el-container{
    height:100VH;
    overflow:hidden;
    /*background:#e1e9f1;
    background:#DAE3EF;*/
    background:#efefef;
}
.el-container >>>.el-tabs__nav-scroll{
    
    background:#efefef;
    border-bottom:1px solid #ddd;
}
.el-header{
    background:#046fc1;
    /*
    background: linear-gradient(180deg, #57B2FB 0%, #2C74EE 100%);*/
    box-shadow: 0px 7px 10px 9px rgba(0, 21, 41, 0.04);
    border-radius: 4px 4px 0px 0px;
    color:#fff;
    display: flex;
    flex-direction: row;
    padding-left:10px;
}
.model{
    flex:1;
    padding-left:30px;
}

.model_item_home{
    display:inline-block;
    padding-left:10px;
    padding-right:10px;
    cursor: pointer;
}
.model_item{
    display:inline-block;
    padding-left:25px;
    padding-right:25px;
    cursor: pointer;
    width:80px;
    box-sizing: content-box;
}
.model_item:hover{
    /*background:#1c4b8a;
    color:#00e8ff;*/
    background: linear-gradient(180deg, #E2F0F7 0%, #FFFFFF 100%);
    opacity: 0.8;
    color:#7E97B8;
    font-weight:bold;
}
.model_item i{
    vertical-align: middle;
    font-size:15px;
}
.model_span{
    font-size:15px;
}
.model_active{
    /*background:#1c4b8a;
    color:#00e8ff;*/

    background: linear-gradient(180deg, #E2F0F7 0%, #FFFFFF 100%);
    opacity: 0.8;
    color:#7E97B8;
    font-weight:bold;
}

/*
.model_active .kailong{

	width:0;
    height:0;
	border-right:10px solid transparent;
	border-left:10px solid transparent;
	border-bottom:6px solid #dbe3eb;
    position:absolute;
    bottom:0;
    left:40%;
}*/

 .el-footer {
    line-height: 60px;

  }
  .el-header .user{
      display:inline-block;
      font-size:14px;
  }
  #DateTime{
     
      font-size:14px;
  }
  .el-aside {
        color: #333;
       /* text-align: center;*/
        
        display:flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        border-right:1px solid #ddd;
        margin-top:5px;
        /*background:#3687e1;*/
        background:#fff;
        border-radius: 0 5px 5px 0;
        margin-bottom:10px;
    }
    
    .el-aside span{
        font-size:15px;
    }
    .content_item{
        width:100%;
        text-align: left;
        padding:2px;
        cursor: pointer;
        margin-top:10px;
        padding-left:10px;
        /*border-radius: 5px;*/
        /*background:#3687e1  !important;*/
        color:#fff;
        height:50px;
        line-height:40px;
    }
   
    .content_item:hover{
        background:#3379d6 !important;
    }
    .content_item img{
        height:48px;
    }
    .content_item div{
        font-size:14px;
        margin-top:5px;
       /* text-shadow:#e6e3e3 0.1em 0.1em 0.2em;*/
    }
  

  
  .el-main {
   /* background-color: #E9EEF3;*/
    overflow:hidden;
    padding:0;
    display:flex;
    flex-direction: column;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    overflow:hidden;
    margin-top:5px;
    padding-left:10px;
    padding-right:10px;
    padding-bottom:10px;
  }
  .el-main-content{
     
      flex:1;
      display:flex;
      flex-direction: column;
      box-sizing: border-box;
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
      overflow:hidden;
      background:#f8fafb;
      border-radius: 5px;
  }
  .el-tabs{
      display:flex;
      flex-direction: column;
      height:46px;
  }
  .el-tabs__content2{
      flex:1;
      display:flex;
      flex-direction: column;
      overflow:hidden;
      border-radius: 0px 0px 10px 10px;
      position:relative;
      border:1px solid #ddd;
      /*padding-top:10px;*/
  }
  .el-tabs__content{
      height:0;
  }
  .headers{
      height:30px;
      line-height:30px;
      box-sizing: border-box;
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
      padding-top:15px;
      padding-left:20px;
  }
  iframe{
      flex:1;
  }
  
  body > .el-container {
    margin-bottom: 40px;
    height:100%;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }

  /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
  ::-webkit-scrollbar{
    width: 7px;
    height: 7px;
    background-color: #F5F5F5;
  }

  /*定义滚动条轨道 内阴影+圆角*/
  ::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    background-color: #F5F5F5;
  }

  /*定义滑块 内阴影+圆角*/
  ::-webkit-scrollbar-thumb{
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
    background-color: #c8c8c8;
  }
  .el-collapse{
      width:100%;
    
      box-sizing: border-box;
      -moz-box-sizing: border-box;
      -webkit-box-sizing: border-box;
  }
  .el-dialog{
      top:0%  !important;
      left:0%  !important;
  }
  .itemActive{
      background:#3379d6
  }
  .itemActive span{
      font-size:16px;
      font-weight: bold;
  }
  .itemActive img{

      width:30px !important;
      height:30px !important;
  }
  .mainTitle{
    text-align: center;
    font-size:26px;
    font-weight:bold;
    color:#fff;
  }
  .mainModelContent{
    background-image: url('../../assets/img/bg/bgnew2.jpg');
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  .user>>>.el-popover{
    padding:0;
  }
  .griditem:hover {
        -webkit-animation: animate__bounce 1s;
        animation: animate__bounce 1s;
        font-weight:bold;
    }
    .griditem{
        width:100%;
        height:100%;
        color:#fff;
        font-size:18px;;
        padding:10px;
        display:flex;
        flex-direction: column;
        cursor:pointer;
    }
    .griditem i{
        font-size:70px;
        flex:1;
        padding-top:14;
        text-align:center;
    }
    .griditem_text{
        height:30px;
    }
     .is-active{
        background-color:rgb(3,89,154) !important;
    }
</style>
<style >
.el-collapse-item__header.is-active{
      font-weight:bold;
      font-size:19px;
      background:#3379d6 !important;
  }
.el-collapse-item__content{
      padding-bottom:0 !important;
      background:#72aeec;
  }
.el-collapse-item__wrap{
        /*background-color:#3687e1  !important;*/
        border-bottom:0  !important;
        background:#72aeec  !important;
    }
    .el-collapse-item__header{
         background-color:#3687e1  !important;
         color:#fff !important;
         border-bottom:0 !important;
         padding:10px;
    }
    .el-collapse{
        border-top:0 !important;
        border-bottom:0 !important;
    }
    .el-tabs__nav-scroll{
        /*background:#e1e9f1;
         padding-left:10px !important;*/
    }
    .el-tabs__item{
        color:#778ca2 !important;
        font-size:14px !important;
        /*margin-left:5px;*/
        background:#fff;
       /* background:#d3dfeb;
       border-radius: 5px 5px 0 0;
        height:30px !important;
        line-height:30px !important;*/
        vertical-align:bottom;
    }
    .el-tabs__item.is-active{
        /*color:#778ca2 !important;*/
        font-size:14px;
        color:#fff !important;
        /*background:#f8fafb;*/
        background:rgb(4, 111, 193);
        height:40px !important;
        line-height:40px !important;
    }
    .dialog-vertical{
        
    }
    .dialog-vertical .el-dialog {
        left:0%;
        top:0%;
        border-radius: 10px;;
    }
    .el-dialog__header{
        padding: 5px 10px 5px !important;
        border-radius:10px 10px 0 0;
    }
    .el-dialog__headerbtn{
        top:10px  !important;
    }
    .el-dialog__header{
        background:rgb(102, 177, 255);
        color:#fff;
    }
    .el-dialog__title{
        color:#fff  !important;
    }
    .el-dialog__headerbtn{
        color:#fff  !important;
    }
    .el-dialog__close{
        color:#fff  !important;
    }
    .el-dialog__minmax{
        display:none;
    }
    .notice_item{
        display:flex;
        flex-direction: row;
        width:100%;
    }
    .notice_item_content{
        flex:1;
    }
    .notice_item_num{
        width:40px;
        text-align: right;
    }
    .notice_item_num_bage{
        width:20px;
        height:20px;
        background: #ffdddd;
        color:#cf4841;
        display: inline-block;
        font-size:10px;
        line-height:20px;
        text-align: center;
        border-radius: 50%;
        font-weight:bold;
    }
    .el-submenu__title i{
        color:#fff !important;
    }
    
    .el-dialog__wrapper {
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        
    }
    .dialogClassss{
        
        overflow: hidden !important;
    }
    .el-dialog__wrapper::after{
        content: "";
        display: inline-block;
        vertical-align: middle;
        height: 100%;
    }
   .el-dialog{
        margin: auto auto !important;
        display: inline-block;
        vertical-align: middle;
        text-align: center;
        white-space: normal;
        position: relative !important;
    }
</style>
<style>
    .el-menu-item i{
        color:#fff !important;
    }
    .el-submenu .el-menu-item{
        min-width:180px !important ;
    }
    .el-dialog {
        border-radius: 10px !important;
    }
    .dialogClassss .el-dialog {
        display: flex ;
        height:100%;
    }
</style>